<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title> Loading </title>

    <link href="loading.css" rel="stylesheet" type="text/css">

    <script src="//apps.bdimg.com/libs/jquery/1.10.2/jquery.min.js"></script>
    <script src="loading.js"></script>
</head>
<body>
    <button onclick="showLoading()">Loading</button>
    <script>
        function showLoading(){
            loading.show();
            setTimeout( function(){
                loading.hide();
            }, 2000);
        }
    </script>
</body>
</html>